#ifndef UTILS_H
#define UTILS_H

#include "framework.h"
#include "SoundManager.h"

#include < string >

//General functions **************
long getTime();

//generic purposes fuctions
void drawGrid(float dist);

float getDistance (Vector3 A, Vector3 B);
bool isCloserThan(Vector3 A, Vector3 B, float distance);

Vector3 getFireLinePredictive(int attacker, Vector3 targetPos, Vector3 targetSpeed);
bool isOnFireLine(int attacker, Vector3 FireLine, float accuracy);
void fireTarget(int attacker, Vector3 FireLine, int weapon);
Vector3 getFireLine(int attacker, Vector3 targetPos);

// StringUtils.h

namespace StringUtils
{

void MakeUpper(std::string &str);

void MakeLower(std::string &str);

void TrimLeft(std::string& str, const char* chars2remove = " ");

void TrimRight(std::string& str, const char* chars2remove = " ");

void ReplaceLeading(std::string& str, const char* chars2replace, char c);

}


#endif
